<div class="slider1">
<script type="text/javascript">
	
	window.addEvent('domready', function() {
		
		//slider variables for making things easier below
		var itemsHolder = $('container');
		var myItems = $$(itemsHolder.getElements('.item'));
		
		//controls for slider
		var theControls = $('controls1');
		var numNavHolder = $(theControls.getElement('ul'));
		var thePlayBtn = $(theControls.getElement('.play_btn'));
		var thePrevBtn = $(theControls.getElement('.prev_btn'));
		var theNextBtn = $(theControls.getElement('.next_btn'));
		
		
		//create instance of the slider, and start it up		
		var mySlider = new SL_Slider({
			slideTimer: 6000,
			orientation: 'horizontal',  
			fade: true,                  
			isPaused: true,
			container: itemsHolder,
			items: myItems,
			numNavActive: true,
			numNavHolder: numNavHolder,
			playBtn: thePlayBtn,
			prevBtn: thePrevBtn,
			nextBtn: theNextBtn
		});
		mySlider.start();
							 
	});
	
</script>

	<div id="container">
	
		<ul class="demo-stream">
			<?php $temp_query = clone $wp_query; query_posts('category_name=' . $pl_category . '&showposts=' . $pl_count . '');   while (have_posts()) : the_post(); if (current_user_can('level_2')) {} else {if (in_category('private')) continue;}

			if ($images = get_children(array(
				'post_parent' => $post->ID,
				'numberposts' => '1',
				'post_type' => 'attachment',
				'post_mime_type' => 'image',
				'order' => 'ASC',
				'orderby' => 'menu_order')))  
			 foreach($images as $image) {  
				$exehill_image = $image->guid; 
				} else {
				$exehill_image = site_url('/wp-content/themes/exehill2/images/bigslider_noimage.png');
				} ?>
		
			

		<li class="item" style="background:url(<?php echo $exehill_image; ?>) no-repeat; ">
		<a href=" <?php if ( $exelink = get_post_meta($post->ID, 'link', true)) {echo $exelink; } else {the_permalink();}?>"></a>
		</li>

<?php endwhile; $wp_query = clone $temp_query; ?>

		
		</ul>
	</div>
	

<div id="controls1">

		<div class="num_nav"><ul></ul></div>
		
</div>




</div>

